﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:MSIInformationViewer">
    <Style TargetType="Button">
        <Setter Property="Foreground" Value="{DynamicResource MainBlackFontColor}"/>
        <Setter Property="FontFamily" Value="{DynamicResource MetroFontSemiBold}"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="VerticalAlignment" Value="Top"></Setter>
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid x:Name="Grid">
                        <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>
                        <ContentPresenter HorizontalAlignment="Center" Margin="-10" VerticalAlignment="Center" RecognizesAccessKey="True"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="#D5E1F2"></Setter>
                            <Setter Property="Foreground" Value="#19478A"></Setter>
                            <Setter  Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect Color="White" BlurRadius="10" Opacity="500" ShadowDepth="0" RenderingBias="Performance"></DropShadowEffect>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Property="Background" Value="Transparent"></Setter>
                            <Setter Property="Foreground" Value="#19478A"></Setter>
                            <Setter  Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect Color="White" BlurRadius="10" Opacity="500" ShadowDepth="0" RenderingBias="Performance"></DropShadowEffect>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Main Controls Style -->
    <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
        <Setter Property="BorderBrush"
                Value="Black" />
        <Setter Property="BorderThickness"
                Value="1"></Setter>
        <Setter Property="FontFamily"
                Value="Segoe UI"></Setter>
        <Setter Property="FontSize"
                Value="12"></Setter>
        <Setter Property="VerticalContentAlignment"
                Value="Center"></Setter>
        <Setter Property="Background"
                Value="White"></Setter>
        <Setter Property="MinHeight"
                Value="24"></Setter>
        <Setter Property="SelectionBrush"
                Value="#40A0F9"></Setter>
        <!--<Setter Property="SelectionOpacity"
                Value="0.2"></Setter>-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Border Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer  Margin="{TemplateBinding Padding}" VerticalScrollBarVisibility="Hidden" x:Name="PART_ContentHost" Foreground="{TemplateBinding Foreground}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource MainBlackFontColor}"/>
                            <!--<Setter TargetName="Border" Property="BorderThickness" Value="1"/>-->
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource MainBlackFontColor}"/>
                            <!--<Setter TargetName="Border" Property="BorderThickness" Value="1"/>-->
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource MainBlackFontColor}"/>
                            <!--<Setter TargetName="Border" Property="BorderThickness" Value="1"/>-->
                        </Trigger>
                        <Trigger Property="IsReadOnly" Value="True">
                            <Setter TargetName="PART_ContentHost"  Property="Opacity" Value="0.5"></Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="BorderBrush" Value="#ADB2B5"/>
                            <Setter TargetName="Border" Property="BorderThickness" Value="1"/>
                            <Setter Property="Background" Value="#ADB2B5"></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <DockPanel LastChildFill="true" VerticalAlignment="Center">
                        <AdornedElementPlaceholder Name="customAdorner" VerticalAlignment="Center" >
                            <Border BorderBrush="#cc0000" BorderThickness="1"/>
                        </AdornedElementPlaceholder>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- TextBlock -->
    <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
        <Setter Property="FontFamily"
                Value="Segoe UI Semibold" />
        <Setter Property="TextAlignment"
                Value="Right" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Foreground"
                Value="#444444" />

        <Setter Property="FontSize"
                Value="12" />
        <Setter Property="Width"
                Value="110" />
    </Style>

</ResourceDictionary>